// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import Index from './components/Index/index.vue'
import '../src/assets/iconfont/iconfont.css'
import './assets/iconfont/iconfont.js'
import 'element-ui/lib/theme-chalk/index.css'
import Axios from 'axios';
Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(Axios)
// const http = axios.create({ // 创建一个拥有通用配置的axios实例
//   timeout: 1000 * 30, // 请求超时时间（毫秒）
//   withCredentials: true, // 是否携带cookie信息
//   headers: { // 头部信息
//     'Content-Type': 'application/json; charset=utf-8'
//   }
// })

// http.interceptors.request.use(config => { //添加一个请求拦截器
//   // 请求头带上token	在发送请求之前做某事
//   let time = new Date().getTime();
//   config.params['time'] = time;
//   config.headers['sign'] = md5('{\"partnerName\":\"QN\",\"account\":\"Test\",\"timestamp\":\"2020-02-24 22:20:41\",\"requestType\":\"leftTicket\",\"data\":\"eyJUaWNrZXREYXRlIjoiMjAyMC0wMy0yNCIsIkZyb21TdGF0aW9uIjoi5LiK5rW3IiwiVG9TdGF0aW9uIjoi5piG5piOIn0=\",\"sign\":\"3D1C02441CB0CCE980A2A00ACDFD6B45\",\"clientInfo\":null}' + time);
//   return config
// }, error => {
//   return Promise.reject(error)
// })

// Vue.prototype.$axios = http;




/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {
    App,
    ElementUI,
    Index
  },
  template: '<App/>'
})
